﻿using JTTD.Domain.Dtos;
using JTTD.Domain.Dtos.CompanyUserInfo.Request;
using JTTD.Domain.Dtos.CompanyUserInfo.Response;
using System.Threading.Tasks;

namespace JTTD.Domain.IService
{
    /// <summary>
    /// 管理员/店家信息服务
    /// </summary>
    public interface ICompanyUserInfoService : IDependency
    {
        /// <summary>
        /// 店家入驻
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<ApiResult<GetCompanyUserInfoDto>> InsertCompanyUser(InsertCompanyUserInfoRequestDto model);



        /// <summary>
        /// 获取商户信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ApiResult<GetCompanyUserInfoDto>> GetCompanyUserInfoById(int id);

        /// <summary>
        /// 获取商户信息
        /// </summary>
        /// <param name="id"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<ApiResult<GetCompanyUserInfoDto>> GetCompanyUserInfoById(int id, int userId);

        /// <summary>
        /// 获取商户信息(oepnId)
        /// </summary>
        /// <param name="id"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<ApiResult<GetCompanyUserInfoDto>> GetCompanyUserInfoByOpenId(string openId);


        /// <summary>
        /// 获取分页数据
        /// </summary>
        /// <param name="search"></param>
        /// <returns></returns>
        Task<ApiResult<PageResult<GetCompanyUserInfoDto>>> GetPageList(SearchCompanyUserInfoDto search);

        /// <summary>
        /// 微信公众号展示审核通过的店家列表
        /// </summary>
        /// <param name="search"></param>
        /// <returns></returns>
        Task<ApiResult<PageResult<GetShopUserDto>>> GetShopUserList(SearchShopRequestDto search);

        /// <summary>
        /// 获取所有店家类型
        /// </summary>
        /// <returns></returns>
        Task<ApiResult<string[]>> GetAllShopType();

        /// <summary>
        /// 修改店铺密码
        /// </summary>
        /// <param name="shopId"></param>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult<bool>> UpdateShopPwd(int shopId, UpdateShopPwdRequestDto dto);

        /// <summary>
        /// 修改店铺信息
        /// </summary>
        /// <param name="shopId"></param>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult<bool>> UpdateShopInfo(int shopId, UpdateShopInfoRequestDto dto);


        /// <summary>
        /// 审核店铺
        /// </summary>
        /// <param name="shopId"></param>
        /// <param name="status"></param>
        /// <returns></returns>
        Task<ApiResult<bool>> ExamineShop(int shopId, int status);

        /// <summary>
        /// 重置店家密码
        /// </summary>
        /// <param name="shopId"></param>
        /// <returns></returns>
        Task<ApiResult<bool>> ResetShopPassword(int shopId);


        Task<ApiResult<bool>> UpdateAdminPassword(int userId, string newPwd);

        /// <summary>
        /// 删除商户
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<ApiResult<bool>> DeleteCompanyUserInfo(int shopId);
    }
}
